package com.robam.cloud.common.bean.authcenter.enumspace;

public enum RokiLoginTypeEnum {
    MOBILE("mobile", "本机号登陆"),
    MOBILESMSCODE("mobileSmsCode", "手机验证码登陆"),
    MOBILEPASSWORD("mobilePassword", "手机密码登陆"),
    WECHAT("wx", "微信授权登陆"),
    APPSTORE("apple", "appstore授权登陆");

    private String code;
    private String name;

    RokiLoginTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static RokiLoginTypeEnum getRokiLoginTypeEnumByCode(String code) {
        for (RokiLoginTypeEnum rokiLoginTypeEnum : RokiLoginTypeEnum.values()) {
            if (rokiLoginTypeEnum.getCode().equals(code)) {
                return rokiLoginTypeEnum;
            }
        }
        return null;
    }
}
